// 引入api
import {createStore} from 'vuex'
import user from './modules/user'

// 创建vuex 实例
const store = createStore({
    modules: {
        user
    },
    state() {
        return {
            count: 0
        }
    },
    mutations: {
        increment(state) {
            state.count++
        }
    }
})

// 对外抛出vuex实例
export default store